package com.qms.qep.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qms.common.annotation.Excel;
import com.qms.common.core.domain.BaseEntity;

/**
 * 不合格品记录对象 nonconforming
 * 
 * @author nonconforming
 */
public class Nonconforming extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 检验任务ID */
    @Excel(name = "检验任务ID", sort = 0)
    private Integer taskId;

    /** 任务编号 */
    @Excel(name = "任务编号", sort = 1)
    private String taskCode;
    
    /** 产品ID */
    @Excel(name = "产品ID", sort = 2)
    private Integer productId;

    /** 产品名称 */
    @Excel(name = "产品名称", sort = 3)
    private String productName;
    
    /** 批次ID */
    @Excel(name = "批次ID", sort = 4)
    private Integer batchId;

    /** 批次编号 */
    @Excel(name = "批次编号", sort = 5)
    private String batchCode;
    
    /** 不合格数量 */
    @Excel(name = "不合格数量", sort = 6)
    private Integer quantity;

    /** 缺陷ID */
    @Excel(name = "缺陷ID", sort = 7)
    private Integer defectId;

    /** 缺陷名称 */
    @Excel(name = "缺陷名称", sort = 8)
    private String defectName;
    
    /** 缺陷描述 */
    @Excel(name = "缺陷描述", sort = 9)
    private String defectDescription;

    /** 处理方式（返工/报废/降级等） */
    @Excel(name = "处理方式", readConverterExp = "返=工/报废/降级等", sort = 10)
    private String disposition;

    /** 处理人 */
    @Excel(name = "处理人", sort = 11)
    private String handler;

    /** 处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 12)
    private Date handleTime;

    /** 处理状态 */
    @Excel(name = "处理状态", sort = 13)
    private String processStatus;

    // 扩展字段

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setTaskId(Integer taskId) 
    {
        this.taskId = taskId;
    }

    public Integer getTaskId() 
    {
        return taskId;
    }
    public void setProductId(Integer productId) 
    {
        this.productId = productId;
    }

    public Integer getProductId() 
    {
        return productId;
    }
    public void setBatchId(Integer batchId) 
    {
        this.batchId = batchId;
    }

    public Integer getBatchId() 
    {
        return batchId;
    }
    public void setQuantity(Integer quantity) 
    {
        this.quantity = quantity;
    }

    public Integer getQuantity() 
    {
        return quantity;
    }
    public void setDefectId(Integer defectId) 
    {
        this.defectId = defectId;
    }

    public Integer getDefectId() 
    {
        return defectId;
    }
    public void setDefectDescription(String defectDescription) 
    {
        this.defectDescription = defectDescription;
    }

    public String getDefectDescription() 
    {
        return defectDescription;
    }
    public void setDisposition(String disposition) 
    {
        this.disposition = disposition;
    }

    public String getDisposition() 
    {
        return disposition;
    }
    public void setHandler(String handler) 
    {
        this.handler = handler;
    }

    public String getHandler() 
    {
        return handler;
    }
    public void setHandleTime(Date handleTime) 
    {
        this.handleTime = handleTime;
    }

    public Date getHandleTime() 
    {
        return handleTime;
    }
    public void setProcessStatus(String processStatus) 
    {
        this.processStatus = processStatus;
    }

    public String getProcessStatus() 
    {
        return processStatus;
    }
    
    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getBatchCode() {
        return batchCode;
    }

    public void setBatchCode(String batchCode) {
        this.batchCode = batchCode;
    }

    public String getDefectName() {
        return defectName;
    }

    public void setDefectName(String defectName) {
        this.defectName = defectName;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskId", getTaskId())
            .append("productId", getProductId())
            .append("batchId", getBatchId())
            .append("quantity", getQuantity())
            .append("defectId", getDefectId())
            .append("defectDescription", getDefectDescription())
            .append("disposition", getDisposition())
            .append("handler", getHandler())
            .append("handleTime", getHandleTime())
            .append("processStatus", getProcessStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 